from flask import Flask, request, jsonify, make_response, send_file
from flask_cors import CORS
import os

app = Flask(__name__)
# 允许所有来源的跨域请求
CORS(app)

@app.route("/img/<path:filename>", methods=["GET"])
def getFavicon(filename):
    return send_file(os.path.join("img", filename), mimetype="image/vnd.microsoft.icon", as_attachment=True)

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8081)